package com.IO;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

//普通流测试
public class TestNormal {
    public static void main(String[] args) {

        long start = System.currentTimeMillis();
        try (//创建文件输入流
             FileInputStream fis = new FileInputStream("E:\\Pictures\\akali.jpg");
             //创建文件输入流
             FileOutputStream fos = new FileOutputStream("E:\\testFile\\copyakali.jpg");
             ){
            //读写数据
            int b;
            while ((b=fis.read())!=-1){
                fos.write(b);
            }
            fis.close();
            fos.close();
        }catch (IOException e) {
            e.printStackTrace();
        }

        long end = System.currentTimeMillis();
        System.out.println("普通流的复制时间:"+(end-start));

    }
}

    